<div class="nav-tabs-custom">
	<ul class="nav nav-tabs">
		<li class="active"><a href="#fa-icons">列表</a></li>
		<li class=""><a href="{:Url('add')}">添加文章</a></li>
	</ul>
	
    <div style="padding:0 20px 20px;">
        <form class="form-search" method="post" action="{:Url('index')}">
            <p>
                文章栏目：
                <select name="column_id" class="form-control select2" style="width:160px;">
                    <option value="">请选择</option>
                    {volist name="columns" id="vo"}
                    <option value="{$vo.id}" {if condition="$formParams['column_id'] eq $vo['id']"}selected{/if}>{$vo._name|raw}</option>
                    {/volist}
                </select> &nbsp;
                文章置顶：
                <select name="is_top" class="form-control select2" style="width:110px;">
                    <option value="">请选择</option>
                    {volist name="is_tops" id="v"}
                    <option value='{$key}' <?php echo (isset($formParams['is_top']) && $formParams['is_top'] != '' && $formParams['is_top'] == $key) ? 'selected' : '';?>>{$v}</option>
                    {/volist}
                </select> &nbsp;
                文章标题：<input type="text" name="title" class="form-control" style="width:200px;" value="{$formParams['title']}" placeholder="请输入标题..."> &nbsp;
                时间：
                <input type="text" name="stat_time" class="form-control laydate-icon-move" id="date_start" style="width:110px;" value="<?php echo !empty($formParams['stat_time']) ? $formParams['stat_time'] : '';?>" autocomplete="off" /> - 
                <input type="text" name="end_time" class="form-control laydate-icon-move" id="date_end" style="width:110px;" value="<?php echo !empty($formParams['end_time']) ? $formParams['end_time'] : '';?>" autocomplete="off" />
            </p>
            <p>
                <button type="submit" class="btn btn-primary">搜索</button> &nbsp;
                <a class="btn btn-danger" href="{:Url('index')}">清空</a>
            </p>
        </form>
    </div>
    
    <div class="box-body">
        <table class="table table-hover table-bordered" id="menus-table">
            <thead>
                <tr>
                    <th width="50">ID</th>
                    <th width="150">栏目名称</th>
                    <th>文章标题</th>
                    <th width="60">状态</th>
                    <th width="60">阅读量</th>
                    <th width="140">添加时间</th>
                    <th width="100">操作</th>
                </tr>
            </thead>
            <tbody>
                {volist name="list" id="vo"}
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.col_name}</td>
                    <td>{$vo.title}</td>
                    <td>
                        {if condition="$vo['status'] eq 1"}已发布{/if}
                        {if condition="$vo['status'] eq 0"}<font style="color:#f00">草稿箱</font>{/if}
                    </td>
                    <td>{$vo.read_number}</td>
                    <td>{$vo.create_time}</td>
                    <td>
                        <div class="visible-md visible-lg hidden-sm hidden-xs">
                            <a href="{:Url('edit',array('id'=>$vo['id']))}" class="btn btn-xs btn-primary btn-flat" data-toggle="tooltip" data-placement="top" title="编辑文章"><i class="fa fa-edit"></i></a>
                            <a href="{:Url('delete',array('id'=>$vo['id']))}" class="btn btn-xs btn-danger btn-flat js-ajax-del" data-toggle="tooltip" data-placement="top" title="删除当前文章"><i class="fa fa-trash-o"></i></a>
                            {if condition="$vo['status'] eq 0"}
                            <a href="{:Url('/news/preview/'.$vo['id'])}" class="btn btn-xs btn-warning btn-flat" data-toggle="tooltip" data-placement="top" title="预览当前文章" target="_blank"><i class="fa fa-play-circle"></i></a>
                            {/if}
                            {if condition="$vo['status'] eq 1"}
                            <a href="{:Url('/news/'.$vo['id'])}" class="btn btn-xs btn-info btn-flat" data-toggle="tooltip" data-placement="top" title="查看当前文章" target="_blank"><i class="fa fa-eye"></i></a>
                            {/if}
                        </div>
                    </td>
                </tr>
                {/volist}
            </tbody>
            <tfoot>
                <tr>
                    <th width="50">ID</th>
                    <th width="150">栏目名称</th>
                    <th>文章标题</th>
                    <th width="60">状态</th>
                    <th width="60">阅读量</th>
                    <th width="140">添加时间</th>
                    <th width="120">操作</th>
                </tr>
            </tfoot>
        </table>
        {$page|raw}
    </div>

</div>